 <ul class="thumbnails" >
   
   <?php foreach($subcategories as $subcategory): ?>
   <?php if($this->config_model->get_subcategories($category_id)->num_rows()>0): ?>
     <li class="span3" >
     <div style="background-color:#5F5A56; width:200px; margin: 10px 10px 10px 0px; padding:10px 10px 10px 10px;">
              <?php
              $sname = str_replace(' ', '-', $subcategory->name);
              $sname = mb_strtolower($sname,'UTF-8');
              
              $cname = str_replace(' ', '-', $category_name);
              $cname = mb_strtolower($cname,'UTF-8');
              
              $numbers = $this->db->where(array('subcategory_id' => $subcategory->subcategories_id, 'category_id' => $category_id))->get('products')->num_rows();
              echo anchor('urunler/'.$cname.'/'.$sname,$subcategory->name." (".$numbers.")",array('class'=>'Links2')); 
               ?> </div>
           <!--    <div class="thumbnails">
             <ul>
              <?php
              
              
                    $brands = $this->config_model->get_brands();
                    foreach($brands->result() as $brand)
                    {
                        if($this->config_model->get_brand_products_by_category_and_subcategort($brand->brand_id,$category_id,$subcategory->subcategories_id)->num_rows()>0)
                        {
                               $bname = str_replace(' ', '-', $brand->name);
                               $bname = mb_strtolower($bname,'UTF-8');
                               $numbers = $this->db->where(array('subcategory_id' => $subcategory->subcategories_id, 'category_id' => $category_id, 'brand_id' => $brand->brand_id))->get('products')->num_rows();
                        //    echo  "<li>".anchor('urunler/'.$cname.'/'.$sname.'/'.$bname,$brand->name." (".$numbers.")")."</li>";
                          

                        }
                    }
              
              ?>
              </ul> 
    
              </div> -->
     </li>
     <?php endif; ?>
     
     <?php endforeach; ?>
        
     </ul>